#include<iostream>
#include<cstdio>
#include<string>
#include <string.h>
#include <assert.h>

using namespace std;

int rotate_left(char *s)
{
	char *p = s;
	int  a; 
	 
	while(*p) {
		if (*p>='a' && *p<='z') {
			a = *p - 'a'; 
			a += 3; 
			if (a>'z'-'a') {
				a -= 'z' - 'a';
			}
			*p = a + 'a'; 
		} else if (*p>='A' && *p<='Z') {
			a = *p - 'A'; 
			a += 3; 
			if (a>'Z'-'A') {
				a -= 'Z' - 'A';
			}
			*p = a + 'A'; 
		} else {
			assert(0); 
		}
		p++; 
	}
	return 0; 	
}

int reverse_order(char *a, int l)
{
	int l2 = l/2; 
	int i, j;
	char t; 
	 
	for (i=0; i<l2; i++) {
		j = l - i - 1; 
		t = a[i]; 
		a[i] = a[j]; 
		a[j] = t; 
	}
	return 0; 
}

int reverse_case(char *a)
{
	char *p = a; 
	while(*p) {
		if (*p>='a' && *p<='z') {
			*p = *p - 'a' + 'A'; 
		} else if (*p>='A' && *p<='Z') {
			*p = *p - 'A' + 'a'; 
		} else {
			assert(0);
		}
		p ++; 
	}
	return 0; 
}
			

int main()
{
	char a[100]; 
	int l; 
	scanf("%s", a);
	l = strlen(a); 
	rotate_left(a); 
	printf("1: %s\n", a); 
	reverse_order(a, l); 
	printf("2: %s\n", a); 
	reverse_case(a); 
	printf("3: %s\n", a); 

	return 0;	
}


